#include <iostream>
#include <string.h>
using namespace std;
int main()
{
  int row, i, j;
  cin >> row;
  getchar();
  char str[1010];
  gets(str);
  int length = strlen(str);
  char **aa = new char*[row];
  int col = (length%row==0)?length/row:length/row+1;
  for(i = 0; i < row; i++)
  {
    aa[i] = new char[col];
    for(j = 0; j < col; j++)
      aa[i][j] = ' ';
  }
  int c = 0;
  for(i = col - 1; i >= 0; i--)
  {
    for(j = 0; j < row; j++)
    {
      if(c < length)
        aa[j][i] = str[c++];
    }
  }
  for(i = 0; i < row; i++)
  {
    for(j = 0; j < col; j++)
      cout << aa[i][j];
    cout << endl;
  }
  return 0;
}